package com.photography.wedding.service;

import com.photography.wedding.dao.PictureMapper;
import com.photography.wedding.dao.UserMapper;
import com.photography.wedding.pojo.Picture;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PhotoService {
    @Autowired
    private PictureMapper pictureMapper;


    public int insertSelective(Picture record){
        return pictureMapper.insertSelective(record);
    }

    public List<Picture> selectUserPicture(String userId) {
        return pictureMapper.selectUserPicture(userId);
    }

    public List<Picture> selectAdminPictureAll(String level) {
        return pictureMapper.selectAdminPictureAll(level);
    }

    public List<Picture> selectUserPictureModuleName(Picture record) {
        return pictureMapper.selectUserPictureModuleName(record);
    }

    public int deleteUserPicture(Picture record){
        return pictureMapper.deleteUserPicture(record);
    }

    public int deleteByPrimaryKey(String id){
        return pictureMapper.deleteByPrimaryKey(id);
    }

    public List<Picture> selectUserLevelModuleNamePicture(Picture record) {
        return pictureMapper.selectUserLevelModuleNamePicture(record);
    }

    public Picture selectByPrimaryKey(String id){
        return pictureMapper.selectByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(Picture record){
        return pictureMapper.updateByPrimaryKeySelective(record);
    }

}
